package com.eobard.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eobard.entity.Department;
import com.eobard.vo.DepartmentQueryVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Eobard Thawne
 * @since 2022-07-31
 */
public interface DepartmentService extends IService<Department> {

    /**
     *  查询所有部门列表
     */
    List<Department> findDepartmentList(DepartmentQueryVo departmentQueryVo);


    /**
     * 根据部门名称模糊查询部门
     */
    List<Department> findDepartmentByDepartmentName(DepartmentQueryVo departmentQueryVo);


    /**
     *  查询上级部门列表
     */
    List<Department> findParentDepartment();

    /**
     * 判断当前部门下是否有子部门
     */
    public boolean hasChildrenOfDepartment(Long id);

    /**
     * 查询部门下是否存在用户
     */
    boolean hasUserOfDepartment(Long id);
}
